﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Apprenda.SaaSGrid.Subscription" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" runat="server">

    <h2>Your Subscription</h2>

    <%
        SubscriptionContext subscription = SubscriptionContext.Instance;
                
        // limiter_NumberOfTasks
        var numberOfTasksAllowed = subscription.GetLimit("limiter_NumberOfTasks").Value;
        var numberOfTasksInUse = subscription.GetLimitCount("limiter_NumberOfTasks").Value;    
        
        // limiter_NumberOfCustomFields
        var numberOfCustomFieldsAllowed = subscription.GetLimit("limiter_NumberOfCustomFields").Value;
        var numberOfCustomFieldsInUse = subscription.GetLimitCount("limiter_NumberOfCustomFields").Value;    
        
        // limiter_NumberOfCustomStatuses
        var numberOfCustomStatusesAllowed = subscription.GetLimit("limiter_NumberOfCustomStatuses").Value;
        var numberOfCustomStatusesInUse = subscription.GetLimitCount("limiter_NumberOfCustomStatuses").Value;            
                
    %>

    <p class="meter meter-limiter">  
        Tasks: <%= numberOfTasksInUse %> out of <%= numberOfTasksAllowed %> are in use
    </p>

    <p class="meter meter-limiter">  
        Custom Fields: <%= numberOfCustomFieldsInUse %> out of <%= numberOfCustomFieldsAllowed %> are in use
    </p>

    <p class="meter meter-limiter">  
        Custom Statuses: <%= numberOfCustomStatusesInUse %> out of <%= numberOfCustomStatusesAllowed %> are in use
    </p>

</asp:Content>